import apiClient from '@/api/apiClient';

// const getOrder = (data?: any) => apiClient.get({ url: '/management/orders', params: data });
const getBannersList = (data?: any) => apiClient.get({ url: '/management/banners', params: data });

// 新增
const createBanner = (data?: any) => apiClient.post({ url: '/management/banner', data });

// 删除
const deleteBanner = (id: number) => apiClient.delete({ url: `/management/banner/${id}` });

// 修改
const updateBanner = (id?: number, data?: any) =>
  apiClient.put({ url: `/management/banner/${id}`, data });

export default {
  getBannersList,
  createBanner,
  deleteBanner,
  updateBanner,
};
